package com.lingz.manager.modules.base.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lingz.manager.base.DevplatBaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * @author Exrick
 */
@Data
@Entity
@Table(name = "t_file")
@TableName("t_file")
@ApiModel(value = "文件")
public class File extends DevplatBaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "原文件名")
    private String name;

    @ApiModelProperty(value = "存储文件名")
    private String fKey;

    @ApiModelProperty(value = "大小")
    private Long sizeZ;

    @ApiModelProperty(value = "文件类型")
    private String type;

    @ApiModelProperty(value = "路径")
    private String url;

    @ApiModelProperty(value = "存储位置 0本地 1七牛 2阿里")
    private Integer location;

    @ApiModelProperty(value = "文件任务id")
    private String taskId;

    @ApiModelProperty(value = "随机时间戳,用作配置文件id")
    private String random;

    @Transient
    @TableField(exist=false)
    @ApiModelProperty(value = "标题")
    private String title;

    @Transient
    @TableField(exist=false)
    @ApiModelProperty(value = "存储地址")
    private String locationUrl;

    @Transient
    @TableField(exist=false)
    @ApiModelProperty(value = "存储地址")
    private String nginxPath;
}